package com.cropdoctor.model.vo;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@TableName("comment_table")
@ApiModel(value = "CommentPo",description = "论坛帖子评论相关Po")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CommentVO {
    @TableId(type = IdType.AUTO)
    private long id;
    @ApiModelProperty(value = "评论人id",required = true,example = "1")
    private long commenterId;
    @ApiModelProperty(value = "评论人昵称",required = true,example = "生姜烧肉")
    private String commenterName;
    @ApiModelProperty(value = "评论人头像路径",required = false,example = "/1/2")
    private String commenterAvatar;
    @ApiModelProperty(value = "被评论人id",required = true,example = "2")
    private long reviewedId;
    @ApiModelProperty(value = "被评论人昵称",required = true,example = "柠檬")
    private String reviewedName;
    @ApiModelProperty(value = "帖子id",required = true,example = "1")
    private long postId;
    @ApiModelProperty(value = "上级评论id（若上级评论是帖子，则为0）",required = true,example = "0")
    private long superiorId;
    @ApiModelProperty(value = "评论内容",required = true,example = "也许是你的西瓜太久没施肥了")
    private String text;
    @ApiModelProperty(value = "点赞数",required = false,example = "1")
    private int likeNumber;
    @ApiModelProperty(value = "创建时间",required = true,example = "2024:2:15:10:54:27")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createDateTime;
}
